package xyz.poke.business.tool.convert;

import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import xyz.poke.business.tool.common.PageResult;
import xyz.poke.business.tool.dto.GoodsDTO;
import xyz.poke.business.tool.entity.Goods;
import xyz.poke.business.tool.param.GoodsParam;
import xyz.poke.business.tool.vo.GoodsVo;

import java.util.List;

/**
 * @author 迫壳
 * @date 2024/5/5 13:46
 */
@Mapper(componentModel = "spring")
public interface GoodsConvert {

    GoodsConvert INSTANCE = Mappers.getMapper(GoodsConvert.class);


    PageResult<GoodsVo> toPaging(PageResult<GoodsDTO> source);

    GoodsVo toVo(GoodsDTO source);

    List<GoodsVo>toVos(List<GoodsDTO> sources);

    Goods toEntity(GoodsParam param);
}
